@section('content')
    @include('admin::partials.alerts')
    @include('admin::partials.exception')

    {!! $content !!}

    @include('admin::partials.toastr')
@endsection

@section('app')
    {!! YmPhp\Admin\Admin::asset()->styleToHtml() !!}

    @php
        $url = $_SERVER['REQUEST_URI'];
        $urlComponents = parse_url($url);
        $parts = explode('/', $urlComponents['path']);
    @endphp
    <div class="content-body" id="app" style="@if($urlComponents['path'] == '/admin' ||  $urlComponents['path'] == '/admin/dashboard')) margin-top: 0; @else margin-top: 10px;  @endif">

        {{-- 页面埋点--}}
        {!! admin_section(YmPhp\Admin\Admin::SECTION['APP_INNER_BEFORE']) !!}

        @yield('content')

        {{-- 页面埋点--}}
        {!! admin_section(YmPhp\Admin\Admin::SECTION['APP_INNER_AFTER']) !!}
    </div>

    {!! YmPhp\Admin\Admin::asset()->scriptToHtml() !!}
    <div class="extra-html">{!! YmPhp\Admin\Admin::html() !!}</div>
@endsection

@if(! request()->pjax())
    @include('admin::layouts.page')
@else
    <title>{{ YmPhp\Admin\Admin::title() }} @if($header) | {{ $header }}@endif</title>

    <script>Ym.wait()</script>

    {!! YmPhp\Admin\Admin::asset()->cssToHtml() !!}
    {!! YmPhp\Admin\Admin::asset()->jsToHtml() !!}

    @yield('app')
@endif
